This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 2, 2013, 1:06 PM
8 Posts
topic has been resolvedResolved

No Luck with opening link on new window or tab.

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: javascript
  • Replies: 3
 
I am working on application and I got stuck when I wanted to open a link on new tab or window.

I have attached my piece of code.
   
 <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:try{
    var doc = database.getProfileDocument("frmConfiguration","");
var url = doc.getItemValueString("HeaderLink1URL");
view.postScript("var tempwindow =window.open('" +url+"','_blank');tempwindow.focus();");
}catch(e){
}}]]></xp:this.action>

 

Any luck?  

 

Thanks in advance. 
Apr 2, 2013, 5:16 PM
586 Posts
Re: No Luck with opening link on new window or tab.
 Did you try any of these suggestions?


http://stackoverflow.com/questions/10853134/open-document-in-new-tab-from-xpages-viewpanel 


 
Apr 3, 2013, 7:35 AM
8 Posts
Re: No Luck with opening link on new window or tab.
Yes I have tried. I found no luck with that. Actually I am trying to open a url on link in new tab. URL is getting populated from back end document. I have tried view.postScript(), but again I am failing to get resolved.
Apr 3, 2013, 10:29 AM
8 Posts
Re: No Luck with opening link on new window or tab.
Resolved:

Find below thread.

http://stackoverflow.com/questions/15765278/no-luck-while-opening-a-link-in-new-tab-using-xpages   

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal